From: Richard M. Stallman Date: Sun, 30 Jan 1994 00:28:54 +0000 (+0000) Subject: (calendar-phases-of-moon): Fix mode line. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~93363 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=1a380827e3eba102eb844d30ee4a7a7c0e735976;p=emacs.git (calendar-phases-of-moon): Fix mode line. --- diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el index 1d8e45492ea..dd0501083b6 100644 --- a/lisp/calendar/lunar.el +++ b/lisp/calendar/lunar.el @@ -192,8 +192,11 @@ remainder mod 4 gives the phase: 0 new moon, 1 first quarter, 2 full moon, (set-buffer (get-buffer-create lunar-phases-buffer)) (setq buffer-read-only nil) (calendar-set-mode-line - (format "Phases of the moon from %s, %d to %s, %d%%-" - (calendar-month-name m1) y1 (calendar-month-name m2) y2)) + (if (= y1 y2) + (format "Phases of the Moon from %s to %s, %d%%-" + (calendar-month-name m1) (calendar-month-name m2) y2) + (format "Phases of the Moon from %s, %d to %s, %d%%-" + (calendar-month-name m1) y1 (calendar-month-name m2) y2))) (erase-buffer) (insert (mapconcat